import Index from "../views/Index.vue";
import My from "../views/main/My.vue";
import sp from '../views/main/shangping.vue'
import goodsDetail from '../views/main/goodsDetail.vue'
import shoppingcart from '../views/main/shoppingcart.vue'
import home from "../views/main/Home.vue"
import global from "../components/Global.vue"
import order from '../views/main/order.vue'
import favorites from '../views/main/Favorites.vue'
import selectByName from '../views/main/selectByName.vue'

export default [
    { 
      path: "/",
      name: "Index",
      component: Index,
      
      children: [
        {
          path: "",
          name: "home",
          component: home,
          meta:{
            isLogin:true
          }
        },
        {
          path: "/my",
          name: "My",
          component: My,
          meta:{
            isLogin:true
          }
        },
        {
          path: "/sp",
          name: "sp",
          component: sp,
          children: [
           ]
        },
        {
          path: "/shoppingcart",
          name: "shoppingcart",
          component: shoppingcart,
          meta:{
            isLogin:true
          }
        },
        {
          path: "/goodsDetail",
          name: "goodsDetail",
          component: goodsDetail,
        },
        {
          path: "/favorites",
          name: "favorites",
          component: favorites,
        },
        {
          path: "/selectByName",
          name: "selectByName",
          component: selectByName,
        },
        {
          path: "/order",
          name: "order",
          component: order,
          meta:{
            isLogin:true
          }
        },
  
      ]
    },
    {
      path:"/login",
      name:"login",
      component:() =>import("../views/login.vue")
    },
    {
      path:"/global",
      name:"global",
      component:global
    }
  ];